//
//  ViewController.swift
//  TestAVSpeech
//
//  Created by sun on 15/9/18.
//  Copyright © 2015年 sunfei. All rights reserved.
//

import UIKit
import AVFoundation

class ViewController: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
        // Do any additional setup after loading the view, typically from a nib.
        
        let string = "Hello, World!Do any additional setup after loading the view, typically from a nib";
        let utterance = AVSpeechUtterance(string:string);
        utterance.voice = AVSpeechSynthesisVoice(language: "en-US")
        let synthesizer = AVSpeechSynthesizer()
        synthesizer.speakUtterance(utterance);
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }


}

